<?php require_once('./header.php');
    
    $start = ($_GET['off']?(int) $_GET['off']:1);
    
    $comiccpu = load_cpu('comic');
    for ($id=$start;$id<($start+20);$id++) {
        if ($comic = $comiccpu->get($id)) {
            $comiccpu->admin_thumbnail($id,$comic['id'].'.'.$comic['ext']);
        }
    }
    
    if ($comiccpu->lastid() > $id) {
?>
        <h1>We're converting a big chunk, please click to continue</h1>
        <p><a href="?off=<?php echo $id; ?>">Continue (<?php echo $id.'/'.$comiccpu->lastid(); ?>)</a></p>
<?php } else { ?>
        <h2>OK, nearly there</h2>
        <p>Pretty much done now, just follow this link to finalize everything and you'll be on your way. <a href="finish.php">Off we go</a></p>
<?php } ?>
    </div>
</body>
</html>